package com.jinkaimen.goodcash.api;

import com.ht.baselibs.bean.ApkInfoBean;
import com.ht.baselibs.bean.BaseGetBean;
import com.jinkaimen.goodcash.bean.AccountShopBean;
import com.jinkaimen.goodcash.bean.BalanceBean;
import com.jinkaimen.goodcash.bean.BankCardBean;
import com.jinkaimen.goodcash.bean.BindQrCodeBean;
import com.jinkaimen.goodcash.bean.GetShopList;
import com.jinkaimen.goodcash.bean.KeyAndValueBean;
import com.jinkaimen.goodcash.bean.LocationBean;
import com.jinkaimen.goodcash.bean.PreWithdrawBean;
import com.jinkaimen.goodcash.bean.ReportAccoutGetBean;
import com.jinkaimen.goodcash.bean.ReportRegisterGetBean;
import com.jinkaimen.goodcash.bean.ReportShopInfoGetBean;
import com.jinkaimen.goodcash.bean.ReportShoperManagerBean;
import com.jinkaimen.goodcash.bean.SaleListBean;
import com.jinkaimen.goodcash.bean.SearchBankBean;
import com.jinkaimen.goodcash.bean.SearchShopBean;
import com.jinkaimen.goodcash.bean.SearchShopPolicy;
import com.jinkaimen.goodcash.bean.TransactionHistoryBean;
import com.jinkaimen.goodcash.bean.WithDrawListBean;
import com.jinkaimen.goodcash.bean.WithdrawBean;
import com.jinkaimen.goodcash.constant.HttpConfig;

import java.util.List;

import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;


public interface Api {
    @POST(HttpConfig.Path.REST)
    @FormUrlEncoded
    Call<String> sendValidate(
            @Field("serviceCode") String serviceCode,
            @Field("cellphone") String cellphone,
            @Field("type") String type
    );

    @POST(HttpConfig.Path.REST)
    @FormUrlEncoded
    Call<AccountShopBean> register(
            @Field("serviceCode") String serviceCode,
            @Field("shopName") String shopName,
            @Field("industryCode") String industryCode,
            @Field("cellphone") String cellphone,
            @Field("code") String code,
            @Field("password") String password
    );

    @POST(HttpConfig.Path.REST)
    @FormUrlEncoded
    Call<AccountShopBean> login(
            @Field("serviceCode") String serviceCode,
            @Field("cellphone") String cellphone,
            @Field("password") String password
    );

    @POST(HttpConfig.Path.REST)
    @FormUrlEncoded
    Call<List<KeyAndValueBean>> getSettleType(
            @Field("serviceCode") String serviceCode
    );

    @POST(HttpConfig.Path.REST)
    @FormUrlEncoded
    Call<List<LocationBean>> getCityList(
            @Field("serviceCode") String serviceCode,
            @Field("parentCode") String parentCode
    );

    @POST(HttpConfig.Path.REST)
    @FormUrlEncoded
    Call<BankCardBean> getBankCardInfo(
            @Field("serviceCode") String serviceCode,
            @Field("cardNO") String cardNO
    );

    @POST(HttpConfig.Path.REST)
    @FormUrlEncoded
    Call<String> sendCollectCard(
            @Field("serviceCode") String serviceCode,
            @Field("cardNO") String cardNO,
            @Field("cardBank") String cardBank,
            @Field("cardAccountName") String cardAccountName,
            @Field("sid") long sid,
            @Field("bankAddress") String bankAddress,
            @Field("idcardNO") String idcardNO,
            @Field("branchCode") String branchCode,
            @Field("branchDistrictCode") String branchDistrictCode
    );


    @POST(HttpConfig.Path.REST)
    @FormUrlEncoded
    Call<GetShopList> shopList(
            @Field("serviceCode") String serviceCode,
            @Field("uid") long uid
    );


    @POST(HttpConfig.Path.REST)
    @FormUrlEncoded
    Call<BalanceBean> getBalance(
            @Field("serviceCode") String serviceCode,
            @Field("accountId") long accountId
    );

    @POST(HttpConfig.Path.REST)
    @FormUrlEncoded
    Call<String> withdrawCode(
            @Field("serviceCode") String serviceCode,
            @Field("accountId") long accountId
    );

    @POST(HttpConfig.Path.REST)
    @FormUrlEncoded
    Call<WithdrawBean> withdraw(
            @Field("serviceCode") String serviceCode,
            @Field("totalAmount") String totalAmount,
            @Field("channel") int channel,
            @Field("accountId") long accountId,
            @Field("verifyCode") String verifyCode
    );

    @POST(HttpConfig.Path.REST)
    @FormUrlEncoded
    Call<WithDrawListBean> withdrawList(
            @Field("serviceCode") String serviceCode,
            @Field("accountId") long accountId,
            @Field("pageNo") int pageNo,
            @Field("pageSize") int pageSize
    );

    @POST(HttpConfig.Path.REST)
    @FormUrlEncoded
    Call<PreWithdrawBean> preWithdraw(
            @Field("serviceCode") String serviceCode,
            @Field("accountId") long accountId,
            @Field("channel") int channel
    );

    @POST(HttpConfig.Path.REST)
    @FormUrlEncoded
    Call<String> bindQrCode(
            @Field("serviceCode") String serviceCode,
            @Field("userId") long userId,
            @Field("code") String code,
            @Field("shopId") long shopId
    );

    @POST(HttpConfig.Path.REST)
    @FormUrlEncoded
    Call<ResponseBody> consult(
            @Field("serviceCode") String serviceCode,
            @Field("requestData") String requestData
    );

    @POST(HttpConfig.Path.REST)
    @FormUrlEncoded
    Call<BaseGetBean> clientid(
            @Field("serviceCode") String serviceCode,
            @Field("clientid") String clientid
    );

    @POST(HttpConfig.Path.REST)
    @FormUrlEncoded
    Call<String> resetPwd(
            @Field("serviceCode") String serviceCode,
            @Field("cellphone") String cellphone,
            @Field("password") String password,
            @Field("code") String code
    );

    @POST(HttpConfig.Path.REST)
    @FormUrlEncoded
    Call<String> logout(
            @Field("serviceCode") String serviceCode,
            @Field("accessToken") String accessToken
    );

    @POST(HttpConfig.Path.REST)
    @FormUrlEncoded
    Call<TransactionHistoryBean> transactionHistory(
            @Field("serviceCode") String serviceCode,
            @Field("accountId") long accountId,
            @Field("pageNo") int pageNo,
            @Field("pageSize") int pageSize,
            @Field("date") String date
    );

    @POST(HttpConfig.Path.REST)
    @FormUrlEncoded
    Call<SaleListBean> saleList(
            @Field("serviceCode") String serviceCode,
            @Field("parentID") long parentID,
            @Field("sid") long sid
    );

    @POST(HttpConfig.Path.REST)
    @FormUrlEncoded
    Call<String> saveSale(
            @Field("serviceCode") String serviceCode,
            @Field("role") int role,
            @Field("cellphone") String cellphone,
            @Field("realname") String realname,
            @Field("parentID") long parentID,
            @Field("sid") long sid
    );

    @POST(HttpConfig.Path.REST)
    @FormUrlEncoded
    Call<AccountShopBean> syncAccoutInfo(
            @Field("serviceCode") String serviceCode,
            @Field("id") long id
    );

    @POST(HttpConfig.Path.REST)
    @FormUrlEncoded
    Call<ApkInfoBean> getUpdateApkUrl(
            @Field("serviceCode") String serviceCode
    );


    @POST(HttpConfig.Path.REST)
    @FormUrlEncoded
    Call<ReportAccoutGetBean> reportLogin(
            @Field("serviceCode") String serviceCode,
            @Field("username") String username,
            @Field("password") String password
    );

    @POST(HttpConfig.Path.REST)
    @FormUrlEncoded
    Call<ReportRegisterGetBean> reportRegister(
            @Field("serviceCode") String serviceCode,
            @Field("cellphone") String cellphone,
            @Field("shopName") String shopName,
            @Field("industryCode") String industryCode,
            @Field("auid") long auid
    );

    @POST(HttpConfig.Path.REST)
    @FormUrlEncoded
    Call<ReportShopInfoGetBean> reportGetShopInfo(
            @Field("serviceCode") String serviceCode,
            @Field("id") long id
    );

    @POST(HttpConfig.Path.REST)
    @FormUrlEncoded
    Call<BindQrCodeBean> reportBindQrCode(
            @Field("serviceCode") String serviceCode,
            @Field("userId") long userId,
            @Field("code") String code,
            @Field("shopId") long shopId
    );

    @POST(HttpConfig.Path.REST)
    @FormUrlEncoded
    Call<ReportShoperManagerBean> reportShoperManager(
            @Field("serviceCode") String serviceCode,
            @Field("auid") long auid,
            @Field("currentPage") int currentPage,
            @Field("status") int status,
            @Field("updateTimeSortType") int updateTimeSortType
    );

    @POST(HttpConfig.Path.REST)
    @FormUrlEncoded
    Call<ReportShoperManagerBean> reportPassShoperList(
            @Field("serviceCode") String serviceCode,
            @Field("auid") long auid,
            @Field("currentPage") int currentPage,
            @Field("sortType") int status
    );

    @POST(HttpConfig.Path.REST)
    @FormUrlEncoded
    Call<SearchBankBean> searchBank(
            @Field("serviceCode") String serviceCode,
            @Field("bankName") String bankName,
            @Field("districtCode") String districtCode,
            @Field("currentPage") int currentPage,
            @Field("branchName") String branchName
    );

    @POST(HttpConfig.Path.REST)
    @FormUrlEncoded
    Call<SearchBankBean> searchFatherBank(
            @Field("serviceCode") String serviceCode,
            @Field("bankName") String bankName,
//            @Field("districtCode") String districtCode,
            @Field("currentPage") int currentPage
//            @Field("pageSize") int pageSize
//            @Field("branchName") String branchName
    );

    @POST(HttpConfig.Path.REST)
    @FormUrlEncoded
    Call<SearchShopBean> searchShopInfo(
            @Field("serviceCode") String serviceCode,
            @Field("id") long id
    );

    @POST(HttpConfig.Path.REST)
    @FormUrlEncoded
    Call<SearchShopPolicy> searchShopPolicy(
            @Field("serviceCode") String serviceCode,
            @Field("id") long id
    );

    @POST(HttpConfig.Path.REST)
    @FormUrlEncoded
    Call<String> submitPolicy(
            @Field("serviceCode") String serviceCode,
            @Field("uid") long uid,
            @Field("wechatTradeRateT1") String wechatTradeRateT1,
            @Field("alipayTradeRateT1") String alipayTradeRateT1,
            @Field("wechatIsOpen") String wechatIsOpen,
            @Field("alipayIsOpen") String alipayIsOpen,
            @Field("isOpenD0") String isOpenD0
    );
}
